<?php if ($command == "done"): ?>
	<div id="success-notice-2">
		We've successfully reset your password and sent you an email with the instructions you will need to follow in order to set a new password.
	</div>
<?php else: ?>
	<form id="reset-password-form" action="<?php echo url_for('/profile-reset-password-mini') ?>" method="post">
		<?php echo $form->renderHiddenFields(false) ?>
		<div id="reset-password-row">
			<div id="reset-password-heading">Reset your password?</div>
		</div>
		<div class="row">
			<ul class="text">
				<li class="first">
					<?php echo $form['email']->renderLabel() ?>
					<?php echo $form['email'] ?>
					<?php if ($form["email"]->hasError()): ?>
						<?php include_partial("common/error", array("form" => $form, "field" => "email", "name_format" => "reset_password")) ?>
					<?php endif; ?>
				</li>
			</ul>
		</div>
		<div class="clear"></div>
		<div class="row">
			<ul class="submit">
				<li>
					<button class="blue-button-30" type="submit" id="submit-reset-mini">Reset</button>
				</li>
			</ul>
		</div>
	</form>
	<script type="text/javascript">
		//<![CDATA[
		$(document).ready(function(){
			// hide element's error on focus
			$formElement = $('form .prompt-text');
			$formElement.live("focus", function() {
				$this = $(this);
				$("#" + $this.attr("id") + "_error").addClass("error-invisible").removeClass("error-visible");
			});

			// don't show the labels for non-empty input elements
			$('form .prompt-text').each(function(){
				$this = $(this);
				$thisLabel = $this.parent().find(":eq(0)");

				if($.trim($this.val())) {
					$thisLabel.addClass("label-invisible");
					$this.addClass('user-text');
				}
			});

			// make an attempt to submit this form
			$('#submit-reset').click(function() {
				$('#reset-password-form').ajaxSubmit(function(data){
					$('#reset-password-block').html(data);
				});
				return false;
			});
		});
		//]]>
	</script>
<?php endif; ?>